package com.gitee.huanminabc.fastboot.web.exception;

import com.gitee.huanminabc.fastboot.web.servlet.RequestMethodEnum;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;


@EqualsAndHashCode(callSuper = true)
@Data
public class ApiProtocolErrorException extends RuntimeException implements Serializable {
    private RequestMethodEnum protocol;
    private String url;

    public ApiProtocolErrorException(String url, RequestMethodEnum protocol) {
        super(url + " 不支持 " + protocol.name() + " 协议");
        this.protocol = protocol;
        this.url = url;
    }
}